<?php

/**
 * FootballFactory, Copyright Robin Loop & Pascal Wirz, 2013
 * ---
 * Fuellt Demodaten in die Datenbank
 *
 * @author Robin
 */

include($_SERVER['DOCUMENT_ROOT']."/ff_includes/class_database.php");

$sql = <<<sql_statement
    INSERT INTO ff_users(user_login,user_password,user_nicename,user_email,user_registered,user_role)
        VALUES (
            "lopo",
            MD5('fcsg'),
            "Robin Loop",
            "robinloop@gmail.com",
            NOW(),
            1
        );
     INSERT INTO ff_users(user_login,user_password,user_nicename,user_email,user_registered,user_role)
        VALUES (
            "wirzo",
            MD5('1879'),
            "Pascal Wirz",
            "wirzpascal@gmail.com",
            NOW(),
            1
        );

       
   INSERT INTO ff_games 
        VALUES (1,'SC Wipkingen','FC St. Gallen', '2012-12-02 12:00:00',1,'','',1,0,1,1,1);
   
   INSERT INTO ff_games 
        VALUES (2,'SC Wipkingen','FC Oerlikon', '2013-12-12 12:00:00',1,'','',NULL,NULL,1,1,1);
   
   INSERT INTO ff_games 
        VALUES (3,'FC Basel','SC Wipkingen', '2014-08-10 12:00:00',4,'','',NULL,NULL,1,2,1);
        
   
   INSERT INTO ff_gametypes VALUES (1, 'Meisterschaft', 1);
   INSERT INTO ff_gametypes VALUES (2, 'Meisterschaft', 0);
   INSERT INTO ff_gametypes VALUES (3, 'Cup', 1);
   INSERT INTO ff_gametypes VALUES (4, 'Cup', 0);
   
   INSERT INTO ff_seasons VALUES (1, 'SAISON 2012/2013','2012-08-08 12:00:00','2013-06-08 12:00:00');
   INSERT INTO ff_seasons VALUES (2, 'SAISON 2013/2014','2013-08-08 12:00:00','2014-06-08 12:00:00');
   INSERT INTO ff_seasons VALUES (3, 'SAISON 2014/2015','2014-08-08 12:00:00','2015-06-08 12:00:00');
   
   INSERT INTO ff_gamevenues VALUES (1, 'Hardhof','Zürich','www.maps.google.ch');
   
   INSERT INTO ff_teams VALUES (1, 'Herren');
   INSERT INTO ff_teams VALUES (2, 'Damen');
   INSERT INTO ff_teams VALUES (3, 'Junioren B');
   
   
   


sql_statement;

$db = new Database();
$stmt = $db->prepare($sql);
$stmt->execute();
?>
